package cn.edu.scau.cmi.zhuangzhihong.singletonmodel;

import java.util.ArrayList;
import java.util.List;

public class marshal {
	private String name;
private marshal() {
	
}
	private static List<marshal> mar = new ArrayList<marshal>();
	public static List<marshal> getInstance(){
		if(mar.size()==0) {
		marshal mar1 = new marshal();
		mar1.setName("朱德");marshal 
		mar2 = new marshal();
		mar2.setName("彭德怀");
		marshal mar3 = new marshal();
		mar3.setName("林彪");
		marshal mar4= new marshal();
		mar4.setName("刘伯承");
		marshal mar5 = new marshal();
		mar5.setName("贺龙");
		marshal mar6 = new marshal();
		mar6.setName("陈毅");
		marshal mar7 = new marshal();
		mar7.setName("罗荣桓");
		marshal mar8 = new marshal();
		mar8.setName("徐向前");
		marshal mar9 = new marshal();
		mar9.setName("聂荣臻");
		marshal mar10 = new marshal();
		mar10.setName("叶剑英");
		mar.add(mar1);
		mar.add(mar2);
		mar.add(mar3);
		mar.add(mar4);
		mar.add(mar5);
		mar.add(mar6);
		mar.add(mar7);
		mar.add(mar8);
		mar.add(mar9);
		mar.add(mar10);}
		return mar;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
}
